<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 老猫 <thinkcmf@126.com>
// +----------------------------------------------------------------------
namespace app\admin\model;

use app\models\BaseModel;
use think\Exception;
use think\Model;

class WageCycleModel extends BaseModel
{

    protected $type = [
        'more' => 'array',
    ];

    /**
     * 获取工资周期id
     * @param $date
     * @return mixed
     */
    public static function getCycleId($date)
    {
        return self::where('date',$date)->value('id');
    }

    /**
     * @param $date
     * @return float|int|string
     */
    public static function getCycleCount($date)
    {
        return self::where('date',$date)->count();
    }

}